package com.aliyun.messagemgt.dto.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.aliyun.messagemgt.dto.PushChannelDto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

/**
 * @author
 * @date
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ApiModel(value = "发送任务列表模型")
public class MsgSourceVO {

    @ApiModelProperty(value = "发送任务自增ID")
    private Long msgSourceId;

    @ApiModelProperty(value = "发送任务编码")
    private String sourceCode;

    @ExcelProperty(value = "发送任务名称", index = 0)
    @ApiModelProperty(value = "发送任务名称")
    private String sourceName;

    @ApiModelProperty(value = "数据源编码")
    private String messageCode;

    @ApiModelProperty(value = "数据源名称")
    private String messageName;

    @ApiModelProperty(value = "场景编码")
    private String sceneCode;

    @ApiModelProperty(value = "场景名称")
    private String sceneName;

    @ApiModelProperty(value = "消息类型")
    private String messageType;

    @ApiModelProperty(value = "消息类型名")
    private String messageTypeName;

    @ApiModelProperty(value = "推送渠道类型 1 政务微信 2 app 3 网页客户端 4 短信 5 邮件")
    private Integer pushChannelType;

    @ExcelProperty(value = "渠道类型名称", index = 1)
    @ApiModelProperty(value = "渠道类型名称")
    private String pushChannelTypeName;

    @ApiModelProperty(value = "渠道编码")
    private String pushChannelCode;

    @ApiModelProperty(value = "推送渠道ID")
    private Long pushChannelId;


    @ExcelProperty(value = "推送渠道名称", index = 2)
    @ApiModelProperty(value = "推送渠道名称")
    private String pushChannelName;

    @ApiModelProperty(value = "多渠道集合信息")
    private List<PushChannelDto> pushChannelList;

    @ApiModelProperty(value = "消息模板主键id")
    private Long templateId;

    @ApiModelProperty(value = "模板类型 1-APP模板 2-短信模板")
    private Integer templateType;

    @ApiModelProperty(value = "消息模板名称")
    @ExcelProperty(value = "使用模板", index = 3)
    private String templateName;

    @ApiModelProperty(value = "消息模板编码")
    private String templateCode;

    @ApiModelProperty(value = "消息模板标题")
    private String templateTitle;

    @ApiModelProperty(value = "消息模板标题")
    private String templateContent;

    @ApiModelProperty(value = "接收组编码")
    private String receiveGroupCode;

    @ApiModelProperty(value = "接收组名称")
    private String receiveGroupName;


    @ApiModelProperty(value = "管理员")
    private String owner;


    @ApiModelProperty(value = "归属部门编码")
    private String ownerDept;


    @ExcelProperty(value = "归属部门", index = 4)
    @ApiModelProperty(value = "归属部门名称")
    private String ownerDeptName;


    @ApiModelProperty(value = "消息源描述")
    private String sourceDescription;


    @ApiModelProperty(value = "重发推送渠道ID")
    private Integer resendChannelId;

    @ApiModelProperty(value = "重发推送渠道名称")
    private String resendChannelName;

    @ApiModelProperty(value = "流控时间单位 1 分钟 2 小时 3 天")
    private Integer flowControlTimeUnit;

    @ApiModelProperty(value = "流控单位时间内限制")
    private Integer flowControlCountLimit;

    @ApiModelProperty(value = "有效期开始时间")
    @JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;

    @ApiModelProperty(value = "有效期结束时间")
    @JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date endTime;

    /**
     * 审核状态 2未提交 0 未审核 -1 审核未通过 1 审核通过
     */
    /*private Integer auditStatus;*/

    /**
     * 审核备注
     */
   /* private String auditDescribe;*/


    @ApiModelProperty(value = "删除状态 0未删除，1已删除")
    private Integer stateDelete;

    private Date timeDelete;

    private Date timeCreate;

    private String userCreate;

    private Date timeUpdate;

    private String userUpdate;

    @ApiModelProperty(value = "分发目标")
    @ExcelProperty(value = "分发目标", index = 6)
    private String receiverName;

    @ApiModelProperty(value = "分发时间")
    @ExcelProperty(value = "分发时间", index = 7)
    private String timeSend;
    /**
     * 返回给前端的审核状态
     */
//    private String auditStatusReturn;

    @ApiModelProperty(value = "数据权限  1有数据权限   0无数据权限")
    private Integer dataPrivilege;

    @ApiModelProperty(value = "状态")
    @ExcelProperty(value = "状态", index = 5)
    private String pushResultCodeReturn;

    private Integer pushResultCode;

    private Integer msgSourceType;

    @ExcelProperty(value = "消息来源", index = 8)
    private String msgSourceTypeName;

    private Integer handleLogId;

    /**
     * 消息模板类型
     */
    @ApiModelProperty(value = "消息源有效期类型：1：不限 2：一年有效期 3：一个月 4：一周 5：当天有效 6：自定义")
    private Integer sourceType;

    @ApiModelProperty("是否启用 Y-启用 N-停用")
    private String isEnabled;
    @ApiModelProperty("租户code")
    private String tenantCode;

    @ApiModelProperty("租户name")
    private String tenantName;

    @ApiModelProperty(value = "失败重发次数")
    private Integer failureResendTimes;

    @ApiModelProperty(value = "失败重发时间间隔，单位秒")
    private Integer failureResendInterval;

    private String haveChannel;
    private String haveGroup;
    private String haveTemplate;

}
